package com.atcjx.service;

import com.atcjx.MyUtils.ResultFactory;
import com.atcjx.mapper.UserMapper;
import com.atcjx.pojo.Result;
import com.atcjx.pojo.User.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author admin
 * @version 1.0.0
 * @ClassName UserServiceImpl.java
 * @Description TODO
 * @createTime 2021年09月19日 15:44:00
 */
@Service
public class UserServiceImpl  {
    @Autowired
    UserMapper userMapper;

    public List<User> getUsers() {
        return userMapper.getUsers();
    }


    public User getUserById(int id) {
        return userMapper.getUserById(id);
    }


    public int createUser(User user) {
        return userMapper.createUser(user);
    }


    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }


    public User login(String account,String password) {
        return userMapper.getUserByAccount(account);
    }
}
